package IO;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Test3 {


    public static void main(String[] args) throws IOException {
//        String str = "登鹳雀楼 王之涣 白日依山尽，欲穷千里目，更上一层楼。";
//        FileWriter fw = new FileWriter("a.txt");
//        int t;
//     fw.write(str);
        FileReader fr = new FileReader("a.txt");
        int t1;
        char[] chars = new char[4];
        while ((t1=fr.read(chars))!=-1){
            String s = new String(chars, 0, t1);
            System.out.println(s);
        }


        fr.close();
    }
}